﻿namespace CommonData.Model.Core
{
    using System;

    public class LinkTableAttribute : Attribute
    {
        private string className;
        private Type dataType;
        private bool isLazy;
        private string keyName;
        private string name;
        private string sqlPrefix;

        public LinkTableAttribute()
        {
        }

        public LinkTableAttribute(string name, Type dataType, string keyName, string className)
        {
            this.name = name;
            this.dataType = dataType;
            this.keyName = keyName;
            this.className = className;
        }

        public LinkTableAttribute(string name, string sqlPrefix, Type dataType, string keyName, string className)
        {
            this.name = name;
            this.sqlPrefix = sqlPrefix;
            this.dataType = dataType;
            this.keyName = keyName;
            this.className = className;
        }

        public string ClassName
        {
            get
            {
                return this.className;
            }
            set
            {
                this.className = value;
            }
        }

        public Type DataType
        {
            get
            {
                return this.dataType;
            }
            set
            {
                this.dataType = value;
            }
        }

        public bool IsLazy
        {
            get
            {
                return this.isLazy;
            }
            set
            {
                this.isLazy = value;
            }
        }

        public string KeyName
        {
            get
            {
                return this.keyName;
            }
            set
            {
                this.keyName = value;
            }
        }

        public string Name
        {
            get
            {
                return this.name;
            }
            set
            {
                this.name = value;
            }
        }

        public string SqlPrefix
        {
            get
            {
                return this.sqlPrefix;
            }
            set
            {
                this.sqlPrefix = value;
            }
        }
    }
}

